<template>
  <div class="content-wrapper-1">
    <loginOut :pageName="t('opticore.title.inventoryTransactions') " />
    <!-- 功能按钮区域 -->
    <div class="button-container">
      <div class="function-btn" @click="store">
        <img src="@/assets/imgs/rk.png" />
        <div class="title">
          {{ t('opticore.material.store') }}
        </div>
      </div>
      
        <div class="function-btn" @click="outbound">
        <img src="@/assets/imgs/ck.png" />
        <div class="title">
        {{ t('opticore.material.outbound') }}
        </div>
      </div>
       
    </div>
  </div>
</template>

<script setup lang="ts">
import loginOut from '@/components/loginOut/index.vue'
import { useRouter } from 'vue-router'

const router = useRouter()
const { t } = useI18n()

const store = async () => {
  router.push('/customer/material/store')
}

/* 出库 */
const outbound = async () => {
  router.push('/customer/material/outbound')
}
</script>

<style scope lang="less">
.content-wrapper-1 {
   height: calc(100vh - 100px);
  padding:0 20px 0;
  margin-top: 77px;
}

/* 页面标题样式 */
.page-title {
  position: absolute; /* 绝对定位到左上角 */
  top: 30px;
  left: 30px;
  font-size: 36px;
  font-weight: bold;
  color: #1f2329;
  letter-spacing: 1px;
  z-index: 20; /* 确保在装饰元素上方 */
}

/* 按钮容器 - 实现居中 */
.button-container {
  display: flex;
  justify-content: space-around;
  align-items: center;
  gap: 40px; /* 按钮之间的间距 */
  z-index: 10;
  width: 100%;
  padding: 0 200px;
  height: 100%;
  background-color: #fff;
}

/* 功能按钮样式 */
.function-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
cursor: pointer;
  width: 344px;
  height: 440px;
  background: #ffffff;
  box-shadow:
    5px 5px 10px 0px rgba(91, 91, 235, 0.1),
    -5px -5px 10px 0px rgba(91, 91, 235, 0.05);
  border-radius: 10px 10px 10px 10px;
    transition: all 0.3s ease; /* 添加过渡动画效果 */
  img {
    width: 150px;
    height: 146px;
  }
  .title {
    margin-top: 10px;
    
    height: 36px;
    font-family:
      PingFang SC,
      PingFang SC;
    font-weight: 400;
    font-size: 40px;
    color: #17233d;
    line-height: 36px;
    text-align: center;
    font-style: normal;
    text-transform: none;
  }
}

.function-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

/* 装饰元素 */
.decor-element {
  position: absolute;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  opacity: 0.1;
  background: linear-gradient(135deg, #409eff, #67c23a);
}

.top-left {
  top: -150px;
  left: -150px;
}

.bottom-right {
  bottom: -150px;
  right: -150px;
  background: linear-gradient(135deg, #e6a23c, #f56c6c);
}

/* 响应式调整 */
@media (max-width: 992px) {
  .button-container {
    flex-direction: column;
    gap: 30px;
  }

  .function-btn {
    width: 200px;
    height: 150px;
    font-size: 24px;
  }

  .page-title {
    font-size: 28px;
    margin-bottom: 40px;
  }
}
</style>
